
import { Ref, ref, WatchStopHandle } from "@vue/runtime-dom";
import { message, Result } from 'ant-design-vue';
import { ElMessageBox } from "element-plus";
/**
 * 起始页
 */
export default class HomeContent {
    private static instance: HomeContent = new HomeContent();
    watchStopHandles: any;
    /**
     * 起始页
     */
    public static get Default(): HomeContent {
        return this.instance;
    }

    constructor() {
        window.addEventListener('unload', this.Dispose.bind(this));
    }

    Dispose() {
        window.removeEventListener('unload', this.Dispose);

        for (const watchStopHandle of this.watchStopHandles) {
            watchStopHandle();
        }
    }

    //综合结果分析
    public Synthetical: Ref<any> = ref()
    //故障修复记录
    public FaultRepair: Ref<any> = ref()
    //全量评价表数据
    public AED: Ref<any> = ref()
    // 比赛详情信息
    public resultInfo: Ref<any> = ref()
    // 评价表
    public ratingForm: Ref<any> = ref([])
    // 工单基本信息
    public workOrderSheet: Ref<any> = ref([])
    // 任务名称
    public taskName: Ref<any> = ref()
    // 姓名
    public player: Ref<any> = ref()
    // 103成绩详情（只有操作记录）
    public operateRecord: Ref<any> = ref()
    // 搜索输入值
    public searchVal: Ref<any> = ref('')
    // 首页筛选列表
    public searchList: Ref<any> = ref([])
    // 监听值
    public productNumber: Ref<any> = ref('')
    

    //判断类型
    IsJsonString(str: any) {
        try {
            JSON.parse(str);
        } catch (e) {
            return false;
        }
        return true;
    }





    public async Destroy(): Promise<void> {
    }
}
